<template>
    <div class="app-list-container">
        <Banner></Banner>
        <row-image-1></row-image-1>
        <ProductHome></ProductHome>
        <row-image-2></row-image-2>
        <SelectActivity></SelectActivity>
        <Recommend></Recommend>
    </div>
</template>

<script>
import Banner from "home/Banner"
import ProductHome from "home/ProductHome"
import RowImage1 from "home/adImage/row-image-1"
import RowImage2 from "home/adImage/row-image-2"
import SelectActivity from "home/SelectActivity"
import Recommend from "home/recommend/Recommend"
import {mapActions,mapGetters,mapMutations,mapState} from "vuex"
import BScroll from 'better-scroll'
import axios from "utils/http"

export default {
   
    components: {
        ProductHome,
        Banner,
        RowImage1,
        RowImage2,
        SelectActivity,
        Recommend
    },
    methods: {
        ...mapActions("Home",["Home"]),
        ...mapActions("SelectActivity",["SelectActivity"]),
        // ...mapActions("Recommend",["Recommend"])
    },
    async created(){
        
        this.Home()
        this.SelectActivity()
        // this.Recommend()
        // Indicator.open({
        //         text: "加载中...",
        //         spinnerType: "fading-circle"

        //     });

        //     this.result =  await axios({
        //         method: "get",
        //         url: "/home/index.html",
        //         params: {
        //             pageNo: 1
        //         }
        //     })
        //     let action = {
        //         type: "Home",
        //         payload: this.result.data.home
        //     }          
            
        //     this.$store.commit("Home/Home",action)  
                
        //     Indicator.close();
        
   
    },
    // watch: {
    //     result(){
    //         let bscroll =  new BScroll(".app-MainPage",{
    //             pullUpLoad: {
    //                 threshold: 50
    //             }
    //         });
    //         console.log(bscroll)
    //         bscroll.on("pullingUp", ()=>{
    //             // debugger
    //             console.log("shangla")
                
    //         }); 
    //     }
    // }
    
}
</script>
<style lang="stylus" scoped>
    .app-list-container
        padding-top .45rem
        // height 90%
        display flex
        flex-direction column
</style>